﻿// Copyright (c) Inossem. All rights reserved.
// Licensed under the LGPL-3.0 license. See LICENSE file in the project root for full license information.
using DWF.Studio.BaseService.Contract.Studio.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DWF.Studio.BaseService.Contract.Studio
{
    /// <summary>
    /// 设计器交互服务
    /// </summary>
    public interface IDesignerService : IBaseService
    {
        /// <summary>
        /// 在设计器中显示文件
        /// </summary>
        /// <param name="fileFullName"></param>
        void ShowFile(string fileFullName);

        /// <summary>
        /// 关闭文件
        /// </summary>
        /// <param name="fileFullName"></param>
        void CloseFile(string fileFullName);

        /// <summary>
        /// 在跟活动类型名称
        /// </summary>
        /// <returns></returns>
        string GetRootActivityTypeName();

        /// <summary>
        /// 获取根活动code
        /// </summary>
        /// <returns></returns>
        string GetRootActivityCode();

        /// <summary>
        /// 设置活动属性
        /// </summary>
        /// <param name="activityCode">活动code</param>
        /// <param name="param">属性参数</param>
        void SetActivityByCode(string activityCode, SerializableParameters param);

        /// <summary>
        /// 添加活动到工作流中
        /// </summary>
        /// <param name="parentCode">上级活动code</param>
        /// <param name="activityTypeName">类型名称</param>
        /// <param name="param">属性参数</param>
        /// <returns>添加的活动信息</returns>
        IEnumerable<ActivityInfo> AddActivityToWorkflow(string parentCode, string activityTypeName, SerializableParameters param);
    }
}
